/**
 * 
 */
package de.mbenning.fsim.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author Martin.Benning
 *
 */
@Entity
@Table (name = "STATISTIK")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class Statistik {
	
	@Id
	@GeneratedValue (strategy = GenerationType.TABLE)
	@Column (name = "ID",updatable = false, nullable = false)
	protected int id;
	
	@ManyToOne (fetch = FetchType.EAGER)
	@JoinColumn (name = "VEREIN_ID")
	protected Verein verein;
	
	@ManyToOne (fetch = FetchType.EAGER)
	@JoinColumn (name = "SAISON_ID")
	protected Saison saison;
	
	@Column
	public int spieleGesamt;
	@Column
	public int ligaSpiele;
	@Column
	public int pokalSpiele;
	@Column
	public int europacupSpiele;
	@Column
	public int tore;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Verein getVerein() {
		return verein;
	}
	public void setVerein(Verein verein) {
		this.verein = verein;
	}
	public Saison getSaison() {
		return saison;
	}
	public void setSaison(Saison saison) {
		this.saison = saison;
	}
	
}
